<template>
	<view class="jianjie">
		<!-- #ifdef H5 -->
		
		<Tou></Tou>
		<!-- #endif -->
		<scroll-view scroll-y="true" class="main" v-if="list!==null" >
			<view class="tou">
			<h3>{{list.title}}</h3>	
			<view class="shijian flex1">
					<h4  >
				{{list.created_at.slice(0,4)}}年{{list.created_at.slice(5,7)}}月{{list.created_at.slice(8,10)}}日 {{list.created_at.slice(11,16)}}
			</h4>
			<view class="right">
				<text class="iconfont icon-yanjing">{{list.statistics.hits_num+list.flow_num_base}}</text>
				<text class="iconfont icon-dianzan">{{list.statistics.favour_num}}</text>
				<text class="iconfont icon-duanxin">{{list.statistics.like_num}}</text>
			</view>
			</view>
			<p class="jieshao">
				{{list.description}}
			</p>
			<!-- 按钮 -->
			<button class="anniu" size="mini" >关注TA</button>
		
			</view>
			<view class="user">
				<hr>
				<view class="zuozhe fl ">
					<view class="tx">
							<image  :src="'https://ss.lanqb.com/'+user.avatar" mode=""></image>
					</view>
				
					<view class="you">
						<h3>本期嘉宾</h3>
					<h4>{{user.nickname}}</h4>
					</view>
					
				</view>
				<view class="zzjj">
					{{teacher.introduction}}
				</view>
				
			</view>
		<view class="dibu" v-html="list.content">
			
		</view>
		</scroll-view>
	</view>
</template>

<script>
	import Tou from "@/common/nav-tar.vue"
	import { apis } from "@/http/api.js"
	export default {
		data() {
			return {
				// list:{
				// 	title:"",
				// 	created_at:'',
				// 	description:'',
				// 	user:{
				// 		avatar:'',
				// 		nickname:'踩你妈',
				// 	},
				// },
				list:null,
				user:[],
				teacher:[],
			}
		},
		onLoad(option) {
			console.log(option.ids);
			apis.dachujianjie(option.ids).then((res)=>{
			
				this.list=res[1].data.data
				this.user=res[1].data.user
				this.teacher=res[1].data.teacher
					console.log(res[1].data.data,this.user);
			})
		},
		methods: {
			
		},
		components:{
			Tou,
			
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		position: relative;
		height: 87vh;
	
		padding-bottom: 150rpx;
	
	}
	.tou{
		padding: 30rpx;
		box-sizing: border-box;
		h3{
			font-size: 36rpx;
			margin-bottom: 30rpx;
		}
		.shijian{
			    color: #9f9f9f;
				font-size: 24rpx;
				font-weight: 400;
		}
		.jieshao{
			font-size: 26rpx;
			margin-top: 30rpx;
			padding: 30rpx;
			background-color: #f4f4f4;
			line-height: 40rpx;
			color: #595959;
		}
		.anniu{
			display: block;
			border-radius: 30rpx;
			background-color: #edce8c;
			width: 240rpx;
			height: 70rpx;
			padding: 2rpx 12rpx;
			color: #634B19;
			margin: 30rpx auto 0;
		
		
		}
	}
	hr{
		
		border-top: 1px solid #efefef;
	}
	.user{
		padding: 30rpx;
		box-sizing: border-box;
		
		.zuozhe{
			width: 300rpx;
			height: 120rpx;
			margin: 0 auto;
			align-items: center;
			
			.tx{
				width: 114rpx;
				height: 114rpx;
				border-radius: 50%;
				margin-right: 10rpx;
				box-sizing: border-box;
				overflow: hidden;
				padding-top: 2rpx ;
			text-align: center;
				border: 1px solid #edce8c;
				image{
					width: 98%;
					height: 98%;
					border-radius: 50%;
				}
			}
			h3{
			font-size: 26rpx;
			    font-weight: 700;
			    line-height: 36rpx;
			    color: #634b19;	
			}
			h4{
				margin-top: 10rpx;
				    font-size: 26rpx;
				    line-height: 36rpx;
				    color: #434343;
					font-weight: 400;
				    overflow: hidden;
				    white-space: nowrap;
				    text-overflow: ellipsis;
			}
		}
		.zzjj{
			padding-top: 30rpx;
			    margin-top:30rpx;
			    font-size:26rpx;
			    line-height: 40rpx;
			    color: #9f9f9f;
			    border-top: 1px solid #efefef;
		}
	}
	.dibu{
		padding: 30rpx;
		margin-top: 30rpx;
		box-sizing: border-box;
		border-top: 5px solid #efefef;
	}
	.iconfont::before{
		margin-right: 5rpx;
	}
	.iconfont{
		margin-right: 15rpx;
		font-size: 24rpx;
	}

</style>
